home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / phyzzx / myphyx.tex < prev    next >
Text File  |  1992-08-26  |  10KB  |  289 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. % MYPHYX for TEX Version 2.9   -- created 12/15/88
  4. %
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %
  7. \def\MYHEAD{\setbox0=\vtop{\baselineskip=10pt
  8.      \ialign{\eightrm ##\hfil\cr
  9.         \slacbin\cr
  10.         P.~O.~Box 4349\cr
  11.         Stanford, CA 94309\cropen{1\jot}
  12.         (415) 926--4423\cr
  13.         SHARON at SLACVM\cr}}%
  14.    \setbox2=\hbox{\caps Stanford Linear Accelerator Center}%
  15.    \hrule height 0pt \kern -0.5in
  16.    \vbox to 0pt{\vss\centerline{\seventeenrm STANFORD UNIVERSITY}}
  17.    \vbox{} \medskip
  18.    \line{\hbox to 0.7\hsize{\hss \lower 10pt \box2 \hfill }\hfil
  19.          \hbox to 0.25\hsize{\box0 \hfil }}\medskip }
  20.  
  21.   \def\myletter{\let\letterhead=\MYHEAD \letter}
  22.   \def\binno{81}
  23.   \def\slacext{2266}
  24.   \def\half{\hbox{${1\over 2}\,$}}
  25.   \def\etal{{\it et al.}}
  26.  
  27.   \def\bar#1{\overline{#1}}
  28.   \def\kbar{{\mathchar'26\mskip-9muk}}
  29.   \def\pbar{{\rlap/p}}
  30.   \def\ubar{\bar{u}}
  31.   \def\dbar{\bar{d}}
  32.  
  33.   \def\str{\penalty-10000\hfilneg\ }    % line break with right adjust
  34.   \def\Str{\penalty-10000\hfilneg\ }    % line break with right adjust
  35.   \def\nostr{\hfill\penalty-10000\ }    % line break with ragged right
  36.   \let\brk=\nextline
  37.   \def\|{\vrule height 16pt depth 6 pt}
  38.  
  39. \def\ZZ{\hbox{$\not\kern0.15em\not\kern-0.21em\lower0.2em
  40.         \vbox{\hrule width 0.52em height 0.06em depth 0pt}
  41.         \kern-0.50em\raise0.7em
  42.         \vbox{\hrule width 0.52em height 0.06em depth 0pt}$}}
  43.  
  44. \def\frac#1/#2{\leavevmode\kern.1em\raise.5ex\hbox{\the\scriptfont0
  45.          #1}\kern-.1em/\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}
  46.  
  47. %   \frac3/4 gives you a very nice 3/4 - slanted.
  48.  
  49.   \def\IR{{$\rm I\!R$}}
  50.   \def\lozenge{\boxit{\hbox to 1.5pt{
  51.                \vrule height 1pt width 0pt \hfill}}}
  52.  
  53.   \def\Buildrel#1\under#2{\mathrel{\mathop{#2}\limits_{#1}}}
  54.   \def\simZ{{\Buildrel \sim \under Z}}
  55.  
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57. %
  58. % This macro inserts pictures (and, more generally, \vbox es) neatly
  59. %   into the MIDDLE of a paragraph.
  60. %        --- #1 should be a \vbox ---
  61. %
  62. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  63.  
  64.   \def\pix#1{\vadjust{\vbox{\kern 1.0cm #1 \kern 1.0cm}}}
  65.  
  66. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  67. %
  68. % These macros insert (\vbox es) using respectively \topinsert and
  69. %     \pageinsert.  Since these macros put you into vertical mode,
  70. %     they should only be called BETWEEN paragraphs.
  71. %
  72. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  73.  
  74.   \def\tpix#1{\topinsert #1 \endinsert}
  75.   \def\ppix#1{\pageinsert #1 \endinsert}
  76.  
  77. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  78. %
  79. %  To define a \vbox for an inserted figure, use the following command:
  80. %
  81. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  82. %
  83. % \Picture\CompEP\height=4.125in \width=\hsize\caption{\narrower
  84. %         The caption goes here.}
  85. % \savepicture\FigureOne
  86. %        (\Picture  calls \FIG and assigns the figure the caption
  87. %                indicated and the figure number \CompEP.  It also
  88. %                creates a \vbox of the right size for a picture
  89. %                of the indicated height, and \savepicture assigns this
  90. %                to the macro \FigureOne.)
  91. %
  92.  
  93. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  94. %
  95. % TWO LINE MACRO (used in tables)
  96. %
  97. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  98.  
  99. \def\twoline#1:#2#3{\vtop{\hbox to #1{\hss \strut #2 \hss}
  100.                           \hbox to #1{\hss \strut #3 \hss}}}
  101. %
  102. %
  103. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  104. %
  105. % Three nice dots left to right moving upward.
  106. %
  107. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  108. %
  109. \def\mddots{\mathinner{\mskip1mu\raise1pt\hbox{.}\mskip2mu
  110.    \raise4pt\hbox{.}\mskip2mu\raise7pt\vbox{\kern7pt\hbox{.}}\mskip1mu}}
  111. %
  112.  
  113. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  114. %
  115. % \clock returns time in hours:minutes on a 24 hour basis
  116. % check \fullclock too
  117. %
  118. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  119. %
  120. \newcount\timecount
  121. \newcount\hours \newcount\minutes  \newcount\temp \newcount\pmhours
  122.  
  123. \hours = \time
  124. \divide\hours by 60
  125. \temp = \hours
  126. \multiply\temp by 60
  127. \minutes = \time
  128. \advance\minutes by -\temp
  129. \def\hour{\the\hours}
  130. \def\minute{\ifnum\minutes<10 0\the\minutes
  131.             \else\the\minutes\fi}
  132. \def\clock{
  133. \ifnum\hours=0 12:\minute\ AM
  134. \else\ifnum\hours<12 \hour:\minute\ AM
  135.       \else\ifnum\hours=12 12:\minute\ PM
  136.             \else\ifnum\hours>12
  137.                  \pmhours=\hours
  138.                  \advance\pmhours by -12
  139.                  \the\pmhours:\minute\ PM
  140.                  \fi \fi \fi \fi }
  141.  
  142. \def\fullclock{\hour:\minute}
  143.  
  144. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  145. %
  146. % \draft causes the symbolic names of equations to be printed
  147. %        alongside the equation numbers
  148. %
  149. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  150.  
  151. \let\eqnameold=\eqname
  152. \def\draft{\def\eqname##1{\eqnameold##1:{\tt\string##1}}}
  153.  
  154. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  155. %
  156. % Letter with no letterhead
  157. % insert \blankheads after \letters
  158. %
  159. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  160.  
  161. \def\blankheads{\let\letterhead=\blankletterhead
  162.     \lettertopskip=7pt plus 3pt}
  163. \def\blankletterhead{\hrule height 0pt \vskip 1.3in}
  164.  
  165. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  166. %
  167. %  this gives you a boldface character in math mode.
  168. %     $\bold\beta$
  169. %
  170. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  171.  
  172. \def\bold#1{\setbox0=\hbox{$#1$}%
  173.      \kern-.025em\copy0\kern-\wd0
  174.      \kern.05em\copy0\kern-\wd0
  175.      \kern-.025em\raise.0433em\box0 }
  176.  
  177. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  178. %
  179. %  Definition for a slash over a letter
  180. %
  181. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  182.  
  183. % from M. Peskin
  184. \def\dslash{\not{\hbox{\kern-2pt $\partial$}}}
  185. \def\Dslash{\not{\hbox{\kern-4pt $D$}}}
  186. \def\Qslash{\not{\hbox{\kern-4pt $Q$}}}
  187. \def\pslash{\not{\hbox{\kern-2.3pt $p$}}}
  188. \def\kslash{\not{\hbox{\kern-2.3pt $k$}}}
  189. \def\qslash{\not{\hbox{\kern-2.3pt $q$}}}
  190. %
  191. %
  192.  \newtoks\slashfraction
  193.  \slashfraction={.13}
  194.  \def\slash#1{\setbox0\hbox{$ #1 $}
  195.  \setbox0\hbox to \the\slashfraction\wd0{\hss \box0}/\box0 }
  196.  
  197. % EXAMPLE OF HOW TO USE IT
  198. % $\slash D$
  199. % {\slashfraction={.075} $\slash{\cal A}$}
  200. % $\slash B$
  201. % $\slash a$
  202. % {\slashfraction={.09} $\slash p$}
  203. % $\slash q$
  204.  
  205. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  206. %
  207. % this gives you \leftrightarrow over \slash\partial
  208. %
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210.  
  211.  \def\leftrightarrowfill{$\mathord-\mkern-6mu%
  212.    \cleaders\hbox{$\mkern-2mu\mathord-\mkern-2mu$}\hfill
  213.    \mkern-6mu\mathord\leftrightarrow$}
  214.  \def\overlrarrow#1{\vbox{\ialign{##\crcr
  215.        \leftrightarrowfill\crcr\noalign{\kern-1pt\nointerlineskip}
  216.        $\hfil\displaystyle{#1}\hfil$\crcr}}}
  217.  
  218. %  $$ \overlrarrow{\slash\partial} $$
  219.  
  220. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  221. %
  222. %  This is a macro written by Marvin which makes Young tableaux:
  223. %
  224. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  225.  
  226.   \def\yboxit#1#2{\vbox{\hrule height #1 \hbox{\vrule width #1
  227.                   \vbox{#2}\vrule width #1 }\hrule height #1 }}
  228.  
  229.   \def\fillbox#1{\hbox to #1{\vbox to #1{\vfil}\hfil}}
  230.   \def\ybox{\yboxit{0.4pt}{\fillbox{8pt}}\hskip-0.4pt}
  231.   \def\nbox{\yboxit{0pt}{\fillbox{8pt}}}
  232.  
  233.   \def\tableaux#1{\vcenter{\offinterlineskip
  234.                   \halign{&\tabskip 0pt##\cr #1}}}
  235.   \def\cry{\cropen{-0.4pt}}
  236.  
  237. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  238.  
  239. % An example of the use of \tableaux is:
  240. % $$ X = \tableaux{\ybox & \ybox & \ybox \cry
  241. %                  \ybox & \ybox & \nbox \cry
  242. %                  \ybox & \nbox & \nbox \cry} $$
  243. %
  244.  
  245. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  246. %
  247. %       by M. Peskin
  248. %       These macros make 4- and 5-pt skeleton diagrams
  249. %            with labelled endpoints and internal lines.
  250. %
  251. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  252.  
  253.   \def\fourptfcn#1#2#3#4#5{ \matrix{#1\cr\cr#2\cr}
  254.       \hbox{$  \Bigg\rangle \kern -2.5pt
  255.          {\phantom{whichcan}\over {\textstyle \downabit #5} }
  256.            \kern-2.5pt  \Bigg\langle$} \matrix{#3\cr\cr#4\cr} }
  257.   \def\fiveptfcn#1#2#3#4#5#6#7{ \matrix{#1\cr\cr#2\cr}
  258.       \hbox{$  \Bigg\rangle \kern -2.5pt
  259.         {{\pile} \lower  6pt\hbox{$\spire#5$} {\pile}\over
  260.            \phantom{can}{\textstyle \downabit#6}\phantom{which}
  261.              {\textstyle \downabit #7}\phantom{can}}
  262.                \kern-2.5pt \Bigg\langle$} \matrix{#3\cr\cr#4\cr} }
  263.   \def\spire#1{\matrix{#1\cr\Bigm|\cr}}
  264.   \def\pile{\phantom{\matrix{1\cr2\cr3\cr}}}
  265.   \def\downabit{\vphantom{\bigm|}}
  266.  
  267. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  268.  
  269. \def\unlock{\catcode`@=11}   % This allows us to modify PLAIN macros.
  270. %
  271. \def\lock{\catcode`@=12}     % at signs are no longer letters
  272. %
  273. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  274. %
  275. % These changes give you references on the line in brackets [3]
  276. % and in the reference list.  [1]  A. Einstein ...
  277. %
  278. %
  279. %\unlock
  280. %\def\step@ver#1{\rel@x \ifmmode #1\else \ifhmode
  281. %        \roll@ver{$\ {} #1$ }\else {\setbox0=\hbox{${} #1$ }}\fi\fi }
  282. %\def\attach#1{\step@ver{\strut {\mkern 4mu #1} }}
  283. %\def\normalrefmark#1{\attach{ [ #1 ] }}
  284. %\def\NPrefmark#1{\step@ver{{\ [#1]}}}
  285. %\def\refitem#1{\r@fitem{[#1]}}
  286. %\lock
  287. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  288. %
  289.